function objFound()
  return sonarReading(4) < 25
end

explore(objFound)
